package com.example.dao;

import com.example.model.Menu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Hello
 * @since 2024-07-13
 */
public interface MenuMapper extends BaseMapper<Menu> {
    @Select("SELECT dish_id FROM menu WHERE restaurant_id=#{restaurantId} AND dish_name=#{dishName}")
    String getIdByRestaurantIdAndDishName(@Param("restaurantId")String restaurantId,
                                                @Param("dishName")String dishName);
}
